﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
<!-- jsp文件头和头部 -->
<%@ include file="../system/admin/top.jsp"%>
<script type="text/javascript" src="static/js/layer.js"></script>
<link rel="stylesheet" href="static/css/layui.css" media="all">
<script type="text/javascript">
$(function() {
	//日期框
	$('.date-picker').datepicker();
	
})
</script>
</head>
<body>
		<div id="zhongxin">
		
		<h4>
			
			<span style="color: gray;margin: 0 40px;">
			罚息退免审核操作
			</span>
		</h4>
	<div style="width: 80%; margin: 0 40px;">
		<form action="<%=basePath%>faxijianmian/auditOneSave.do" name="Form" id="Form" method="post" enctype="multipart/form-data">
			<input type="hidden" name="reduApplyId" value="${info.reduApplyId}">
			<input type="hidden" name="callLoanNid" value="${info.callLoanNid}">
			<input id="statusId" type="hidden" name="status" value="">
		<table class="table table-bordered" style="width: 92%;">
			<tr>
				<td>退免申请编号</td><td>${info.reduApplyId}</td>
				<td>借款编号</td><td>${info.borrowNid}</td>
			</tr>
			<tr>
				<td>借款产品</td><td>${info.productName}</td>
				<td>借款人</td><td>${info.realName}</td>
			</tr>
			<tr>
				<td>身份证号</td><td>${info.contIdCard}</td>
				<td>审核申请人</td><td>${info.name}</td>
			</tr>
			<tr>
				<td colspan="4">有效期：<fmt:formatDate value="${info.reduDay}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			</tr>
			<tr>
				<td colspan="4">审核提交时间：  <fmt:formatDate value="${info.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			</tr>
			<tr>
				<td>
					退免金额
				</td><td>${info.reduOverdueFee}</td>
				<c:if test="${info.type == 1}">
					<td>当前未还罚息金额</td><td>${info.overdueFee}</td>
				</c:if>
				<c:if test="${info.type == 2}">
					<td>当前已还罚息金额</td><td>${info.receveFee}</td>
				</c:if>
			</tr>
			<tr>
				<td colspan="4">退免说明： ${info.reduInfo}</td>
			</tr>
		</table>
		<table>	
			<tr>
				<td>审批说明：</td>
				<td><textarea id="verifyRemark" name="verifyRemark" class="form-control" rows="5"
						style="width: 440px;height: 100px"></textarea></td>
			</tr>
			<tr>
			<td></td>
			<td>
				<button id="pass" type="button" class="btn btn-primary" value="1" onclick="save()">审核通过</button>
				<button id="refuseAudit1" type="button" class="btn btn-primary" value="2" onclick="sdfgfgdfgg()">审核拒绝</button>
				<button id="cancel" type="button" class="btn btn-primary" onclick="top.Dialog.close()">取消</button>
			</td>
			</tr>
		</table>
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
		</form>
	</div>
		</div>
	
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 单选框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		
		<!-- 编辑框-->
		<script type="text/javascript" charset="utf-8">window.UEDITOR_HOME_URL = "<%=path%>/plugins/ueditor/";</script>
		<script type="text/javascript" charset="utf-8" src="plugins/ueditor/ueditor.config.js"></script>
		<script type="text/javascript" charset="utf-8" src="plugins/ueditor/ueditor.all.js"></script>
		<!-- 编辑框-->
		<script type="text/javascript">
		$(top.hangge());
		function reurl(){ 
			UE.getEditor('content');
			} 
		setTimeout('reurl()',500);
		//审核通过
		function save(){
			$("#statusId").val($("#pass").val());
			$("#pass").attr("disabled", true);
			var content=$("#verifyRemark").val().replace(/\n/g,"<br/>");
			$("#verifyRemark").val(content);
			$.post("<%=basePath%>faxijianmian/auditOneSave.do",$("#Form").serialize(),function(databack){
				if (databack.success) {
					$("#zhongxin").hide();
					$("#zhongxin2").show();
					top.Dialog.close();
				}else{
					layer.alert(databack.msg);
					$("#pass").attr("disabled", false);
				}
			})
		}
		
		//审核拒绝
		function sdfgfgdfgg(){
			$("#statusId").val($("#refuseAudit1").val());
			var content=$("#verifyRemark").val().replace(/\n/g,"<br/>");
			$("#verifyRemark").val(content);
			$.post("<%=basePath%>faxijianmian/auditOneSave.do",$("#Form").serialize(),function(databack){
				if (databack.success) {
					$("#zhongxin").hide();
					$("#zhongxin2").show();
					//document.getElementById('zhongxin').style.display = 'none';
					top.Dialog.close();
				}else{
					layer.alert(databack.msg);
				}
			})
		}
		</script>
</body>
</html>
